package com.community.zhihuishequ.view.base;

import android.app.Activity;
import android.content.Context;
import android.support.v4.app.Fragment;

import com.community.zhihuishequ.net.AppRestService;

/**
 * Created by Administrator on 2017/12/7 0007.
 *
 */

public class BaseFragment extends Fragment {
    protected Activity activity;

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        if (context instanceof Activity) {
            activity = (Activity)context;
        }
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        this.activity = activity;
    }

    protected final String getBaseUrl() {
        return AppRestService.BASE_URL;
    }
}
